package com.yitao.cms.vo.order;

import com.yitao.cms.utils.NumberUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
import java.util.List;

@Setter
@Getter
public class CmsMallOrderVo {

    private Long id;

    /**
     * 订单code
     */
    @ApiModelProperty("订单code")
    private String orderCode;

    /**
     * 父级订单
     */
    @ApiModelProperty("父级订单")
    private String parentOrderCode;

    @ApiModelProperty("微信昵称")
    private String nickName;


    /**
     * 订单类型 默认为1 1:普通商城订单，2 换货订单
     */
    @ApiModelProperty("订单类型 默认为1 1:普通商城订单，2 拼单")
    private Integer orderType;

    /**
     * 下单人的用户id
     */
    @ApiModelProperty("下单人的用户id")
    private Long buyerUserId;

    /**
     * 下单人的用户昵称
     */
    @ApiModelProperty("下单人的用户昵称")
    private String buyerUserName;

    /**
     * 下单人的用户手机号
     */
    @ApiModelProperty("下单人的用户手机号")
    private String buyerUserPhone;

    /**
     * 订单支付类型
     */
    @ApiModelProperty("订单支付类型")
    private Integer payStatus;

    /**
     * 订单总金额 单位为分
     */
    @ApiModelProperty("订单总金额 单位为分")
    private Long orderTotalAmount;

    /**
     * 订单总金额 单位为分
     */
    @ApiModelProperty("订单总金额 单位为元")
    private Double orderTotalAmountYuan;


    /**
     * 商品总金额 单位为分
     */
    @ApiModelProperty("商品总金额 单位为分")
    private Long itemTotalAmount;

    @ApiModelProperty("商品总金额 单位为元")
    private Double itemTotalAmountYuan;
    /**
     * 实际应该支付金额 单位为分
     */
    @ApiModelProperty("实际应该支付金额 单位为分")
    private Long actualAmount;

    @ApiModelProperty("实际应该支付金额 单位为元")
    private Double actualAmountYuan;

    /**
     * 现金帐户等支付的金额(除去优惠券 抵扣劵 余额等)
     */
    @ApiModelProperty("现金帐户等支付的金额(除去优惠券 抵扣劵 余额等  单位为分)")
    private Long confirmPaidFee;

    @ApiModelProperty("现金帐户等支付的金额(除去优惠券 抵扣劵 余额等 单位为元)")
    private Double confirmPaidFeeYuan;

    /**
     * 归属微团队id
     */
    private Long microTeamId;

    private String sellerRemake;

    /**
     * 折扣优惠码
     */
    @ApiModelProperty("折扣优惠码")
    private String discountKey;


    @ApiModelProperty("发货时间 ")
    private String shippingTime;

    /**
     * 订单状态 1:未审核 2:审核通过 3:待复核 4:审核不通过 5:撤销 6:交易完成 7:订单完结
     */
    @ApiModelProperty("订单状态 ")
    private Integer orderStatus;

    private Integer orderStatus2;

    @ApiModelProperty("订单状态 中文")
    private String orderStatusStr;

    @ApiModelProperty("退款时间 ，或者说解决时间")
    private String refundTime;
    /**
     * 收货地址关联id
     */
    @ApiModelProperty("收货地址关联id")
    private Long orderDeliveryAddressId;

    /**
     * 发票关联id
     */
    @ApiModelProperty("发票关联id")
    private Long invoiceId;

    /**
     * 店铺关联id
     */
    @ApiModelProperty("店铺关联id")
    private Long shopId;

    /**
     * 店铺名称，冗余字段
     */
    @ApiModelProperty("店铺名称，冗余字段")
    private String shopName;

    /**
     * 商品计数
     */
    @ApiModelProperty("商品计数")
    private Integer quantity;

    /**
     * 订单备注
     */
    @ApiModelProperty("订单备注")
    private String remake;

    /**
     * 订单审核时间
     */
    @ApiModelProperty("订单审核时间")
    private Date approvedTime;

    /**
     * 创建时间
     */
    @ApiModelProperty("下单时间")
    private String createTime;

    //发货状态
    private Integer logisticStatus;

    private List<Integer> logisticStatusList;

    //开始时间
    private Date startTime;
    //结束时间
    private Date endTime;

    @ApiModelProperty("优惠金额 分")
    private Long discountsAmount;

    @ApiModelProperty("优惠金额 元")
    private Double discountsAmountYuan;

    @ApiModelProperty("运费 分")
    private Long freightFee;

    @ApiModelProperty("运费 元")
    private Double freightFeeYuan;

    //是否可取消订单
    @ApiModelProperty("是否可取消( 是否可以退款)订单 0 否 1 是")
    private Integer cancelOrder;
    //是否可以点击发货
    @ApiModelProperty("是否可以点击发货 0 否 1 是 ")
    private Integer deliverOrder;

    @ApiModelProperty("是否可以退款 0 否 1 是")
    private Integer isRefund;

    @ApiModelProperty("商品详情")
    private List<CmsMallOrderDetailVo> cmsMallOrderDetailVoList;


    @ApiModelProperty("订单总金额")
    private Long totalAmount;

    @ApiModelProperty("订单总金额 元")
    private Double totalAmountYuan;

    @ApiModelProperty("当页订单金额 元")
    private Long pageTotalAmount;

    @ApiModelProperty("当页订单金额 元")
    private Double pageTotalAmountYuan;

    private List<Integer> refundStatusList;

    private Integer refundType;

    @ApiModelProperty("收件人名称")
    private String addresseeName;

    @ApiModelProperty("收货人手机号")
    private String phone;

    private String brand;//品牌

    private String expressNo;//运单号

    private String productName;//商品名称

    @ApiModelProperty("会员身份优惠金额")
    private Long favorableFee3;

    @ApiModelProperty("会员身份优惠金额-元")
    private String favorableFee3ToYuan;

    @ApiModelProperty("会员身份名称")
    private String gradeName;

    @ApiModelProperty("订单是否为vip false:不是 true:是")
    private Boolean vipState;

    @ApiModelProperty("优惠金额")
    private Long couponMoney;

    @ApiModelProperty("优惠金额")
    private Double couponMoneyYuan;

    @ApiModelProperty("支付渠道")
    private String payTypeString;

    private Integer payType;
    @ApiModelProperty("是否可修改物流 0 否 1 是")
    private Integer updateLogistics = 0;

    private List<Integer> payTypeList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public Double getPageTotalAmountYuan() {
        return pageTotalAmountYuan = NumberUtil.centToYuanForDouble(pageTotalAmount);
    }

    public void setPageTotalAmountYuan(Double pageTotalAmountYuan) {
        this.pageTotalAmountYuan = pageTotalAmountYuan;
    }

    public Double getOrderTotalAmountYuan() {
        return orderTotalAmountYuan = NumberUtil.centToYuanForDouble(orderTotalAmount);
    }


    public Double getTotalAmountYuan() {
        return totalAmountYuan = NumberUtil.centToYuanForDouble(totalAmount);
    }

    public Double getItemTotalAmountYuan() {
        return itemTotalAmountYuan = NumberUtil.centToYuanForDouble(itemTotalAmount);
    }


    public Double getActualAmountYuan() {
        return actualAmountYuan = NumberUtil.centToYuanForDouble(actualAmount);
    }


    public Double getConfirmPaidFeeYuan() {
        return confirmPaidFeeYuan = NumberUtil.centToYuanForDouble(confirmPaidFee);
    }

    public Double getDiscountsAmountYuan() {
        return discountsAmountYuan = NumberUtil.centToYuanForDouble(discountsAmount);
    }

    public Double getFreightFeeYuan() {
        return freightFeeYuan = NumberUtil.centToYuanForDouble(freightFee);
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Double getCouponMoneyYuan() {
        return couponMoneyYuan = NumberUtil.centToYuanForDouble(couponMoney);
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
